const state = {
    difficultyId: '',
    // 需要编辑的试题
    needEditQuestion: {},
}

const mutations = {
    setId(state,id){
        state.questionId = id
    },
    infodifficulty(state, data) {
        state.difficultyId = data
    },
    infoQuestion(state, data) {
        state.needEditQuestion = data
        window.sessionStorage.setItem('needEditQuestion', JSON.stringify(data))
    }
}

const actions = {
    setquestionid({commit},id){
        commit('setId',id)
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}
